The purpose of this page is to demonstrate plot_ly by showing an example of the relationship between indoor and outdoor humidity and the temperature difference between indoor and outdoor. Not surprisingly, the relative humidity drops in a heated house, when the outside temperature drops.

# Load data
indoor <- read.csv("Stuen_11_10_2019.csv", skip = 2, sep = ";", stringsAsFactors = FALSE) %>%
  rename(IndoorTemp = Temperature,
         IndoorCO2 = CO2,
         IndoorHumidity = Humidity,
         Time = Timezone...Europe.Copenhagen) %>%
  mutate(Time = as.POSIXct(Time)) %>%
  select(Time, IndoorTemp, IndoorHumidity, IndoorCO2)
  
outdoor <- read.csv("Skuret_11_10_2019.csv", skip = 2, sep = ";") %>%
  rename(OutdoorTemp = Temperature,
         OutdoorHumidity = Humidity,
         Time = Timezone...Europe.Copenhagen) %>%
  mutate(Time = as.POSIXct(Time)) %>%
  select(Time, OutdoorTemp, OutdoorHumidity)


climatedata <- indoor %>%
  left_join(outdoor, by = "Time") %>%
  mutate(Temperaturedifference = IndoorTemp - OutdoorTemp)

3D visualization

plot_ly(climatedata, x = ~Temperaturedifference, y = ~OutdoorHumidity, z = ~IndoorHumidity) %>%
  add_markers(size = 1) %>%
  layout(dragmode = "orbit")
#= “orbit”)